package com.dapeis.web.wx.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;

/**
 * @author 作者 E-mail:
 * @version 创建时间：2017年5月1日 下午8:53:38 类说明
 */

public interface IGarderobeController {

    /**
     * 衣橱添加
     * 
     * @param name
     * @param remark
     * @param typeCode
     * @param img
     * @param request
     * @return
     */
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    public @ResponseBody JsonElement add(@RequestParam String name,
	    @RequestParam String remark, @RequestParam String typeCode,
	    @RequestParam MultipartFile img, HttpServletRequest request);

    /**
     * 删除
     * 
     * @param gid
     * @param request
     * @return
     */
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    public @ResponseBody JsonElement delete(@RequestParam Long gid,
	    HttpServletRequest request);

    /**
     * 衣橱列表
     * 
     * @param request
     * @return
     */
    @RequestMapping(value = "/list")
    public @ResponseBody JsonElement list(HttpServletRequest request);

    /**
     * 衣橱详情
     * 
     * @param gid
     * @param request
     * @return
     */
    @RequestMapping(value = "/detail")
    public @ResponseBody JsonElement detail(@RequestParam Long gid,
	    HttpServletRequest request);

    /**
     * 衣橱更新
     * 
     * @param gid
     * @param name
     * @param remark
     * @param typeCode
     * @param img
     * @param request
     * @return
     */
    @RequestMapping(value = "/modify", method = RequestMethod.POST)
    public @ResponseBody JsonElement modify(@RequestParam Long gid,
	    @RequestParam String name, @RequestParam String remark,
	    @RequestParam String typeCode,
	    @RequestParam(required = false) MultipartFile img,
	    HttpServletRequest request);
}
